import streamcrypt

password = 'bongo'

fin = open('file.txt.crypto', 'rb')    
fout = open('file.txt.plain', 'wb')
    
cipher = streamcrypt.streamcrypt(password)
cipher.decStart()

txt = '-'
while(len(txt)):
    txt=fin.read(1024)
    fout.write(cipher.decNext(txt))
    
fout.write(cipher.decEnd())

fin.close()
fout.close()
